Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / androidApp / src / google / kotlin / org / meshtastic / app / map / component / ClusterItemsListDialog.kt

Displaying Raw • Download

androidApp/src/google/kotlin/org/meshtastic/app/map/component/ClusterItemsListDialog.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 3.21 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.app.map.component

Tff7b72import T7ee787androidx.compose.foundation.clickable
Tff7b72import T7ee787androidx.compose.foundation.layout.PaddingValues
Tff7b72import T7ee787androidx.compose.foundation.layout.fillMaxWidth
Tff7b72import T7ee787androidx.compose.foundation.layout.padding
Tff7b72import T7ee787androidx.compose.foundation.lazy.LazyColumn
Tff7b72import T7ee787androidx.compose.foundation.lazy.items
Tff7b72import T7ee787androidx.compose.material3.AlertDialog
Tff7b72import T7ee787androidx.compose.material3.ListItem
Tff7b72import T7ee787androidx.compose.material3.Text
Tff7b72import T7ee787androidx.compose.material3.TextButton
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787androidx.compose.ui.unit.dp
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.app.map.model.NodeClusterItem
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.nodes_at_this_location
Tff7b72import T7ee787org.meshtastic.core.resources.okay
Tff7b72import T7ee787org.meshtastic.core.ui.component.NodeChip

Tf0883e@Composable
Tff7b72fun Td2a8ffClusterItemsListDialogTb4b4b4(
Te6edf3itemsTb4b4b4: Te6edf3ListTff7b72<Te6edf3NodeClusterItemTff7b72>Tb4b4b4,
Te6edf3onDismissTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3onItemClickTb4b4b4: Tb4b4b4(Te6edf3NodeClusterItemTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3AlertDialogTb4b4b4(
Te6edf3onDismissRequest Tff7b72= Te6edf3onDismissTb4b4b4,
Te6edf3title Tff7b72= Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3text Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3nodes_at_this_locationTb4b4b4)Tb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3text Tff7b72= Tb4b4b4{
T8b949e// Use a LazyColumn for potentially long lists of items
Te6edf3LazyColumnTb4b4b4(Te6edf3contentPadding Tff7b72= Te6edf3PaddingValuesTb4b4b4(Te6edf3vertical Tff7b72= T79c0ff8.Te6edf3dpTb4b4b4)Tb4b4b4) Tb4b4b4{
T8b949e// Dedup by node.num: it's the LazyColumn key and must be unique, but filteredNodes can
T8b949e// contain the same node from two sources (or a num=0 placeholder). See NodeListScreen.
Te6edf3itemsTb4b4b4(Te6edf3itemsTb4b4b4.Te6edf3distinctBy Tb4b4b4{ Tffa657itTb4b4b4.Te6edf3nodeTb4b4b4.Te6edf3num Tb4b4b4}Tb4b4b4, Te6edf3key Tff7b72= Tb4b4b4{ Tffa657itTb4b4b4.Te6edf3nodeTb4b4b4.Te6edf3num Tb4b4b4}Tb4b4b4) Tb4b4b4{ Te6edf3item Tff7b72-Tff7b72>
Te6edf3ClusterDialogListItemTb4b4b4(Te6edf3item Tff7b72= Te6edf3itemTb4b4b4, Te6edf3onClick Tff7b72= Tb4b4b4{ Te6edf3onItemClickTb4b4b4(Te6edf3itemTb4b4b4) Tb4b4b4}Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}Tb4b4b4,
Te6edf3confirmButton Tff7b72= Tb4b4b4{ Te6edf3TextButtonTb4b4b4(Te6edf3onClick Tff7b72= Te6edf3onDismissTb4b4b4) Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3okayTb4b4b4)Tb4b4b4) Tb4b4b4} Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}

Tf0883e@Composable
Tff7b72private Tff7b72fun Td2a8ffClusterDialogListItemTb4b4b4(Te6edf3itemTb4b4b4: Te6edf3NodeClusterItemTb4b4b4, Te6edf3onClickTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4, Te6edf3modifierTb4b4b4: Te6edf3Modifier Tff7b72= Te6edf3ModifierTb4b4b4) Tb4b4b4{
Te6edf3ListItemTb4b4b4(
Te6edf3leadingContent Tff7b72= Tb4b4b4{ Te6edf3NodeChipTb4b4b4(Te6edf3node Tff7b72= Te6edf3itemTb4b4b4.Te6edf3nodeTb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3headlineContent Tff7b72= Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3itemTb4b4b4.Te6edf3nodeTitleTb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3supportingContent Tff7b72= Tb4b4b4{
Tff7b72if Tb4b4b4(Te6edf3itemTb4b4b4.Te6edf3nodeSnippetTb4b4b4.Te6edf3isNotBlankTb4b4b4(Tb4b4b4)Tb4b4b4) Tb4b4b4{
Te6edf3TextTb4b4b4(Te6edf3itemTb4b4b4.Te6edf3nodeSnippetTb4b4b4)
Tb4b4b4}
Tb4b4b4}Tb4b4b4,
Te6edf3modifier Tff7b72=
Te6edf3modifier
Tb4b4b4.Te6edf3fillMaxWidthTb4b4b4(Tb4b4b4)
Tb4b4b4.Te6edf3clickableTb4b4b4(Te6edf3onClick Tff7b72= Te6edf3onClickTb4b4b4)
Tb4b4b4.Te6edf3paddingTb4b4b4(Te6edf3horizontal Tff7b72= T79c0ff8.Te6edf3dpTb4b4b4, Te6edf3vertical Tff7b72= T79c0ff4.Te6edf3dpTb4b4b4)Tb4b4b4, T8b949e// Add some padding around list items
Tb4b4b4)
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s